package event;

import java.util.Enumeration;

import network.Network;
import protocol.Node;
import protocol.Tapestry;

public class EventGen {
	final int TIME = 10000;

	public void autoGen() {
		Enumeration<Node> allnodes = Network.getInstance().getAllNodes();
		Tapestry tempNode;
		while (allnodes.hasMoreElements()) {
			tempNode = (Tapestry) allnodes.nextElement();
			EventQueue.getInstance().add(
					new Event(Event.JOIN, TIME, tempNode,
							Network.getInstance().wellKnownNode, null));
		}

	}
}
